package com.dingup.homework.feign.client.msg;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;


/**
 * Created by wancheng on 2018/7/5.
 */
@Component
@FeignClient(value = "p-pk") //这里的name对应调用服务的spring.applicatoin.name
public interface PaikSendMsgFeignClient {

    /**
     * 第一个学生做完
     *
     * @param userId
     * @param userName
     * @param homeworkId
     * @param studentName
     * @param subjectName
     */
    @RequestMapping(value = "/paike/feign/message/send_homework_finish_msg_for_teacher.do", method = RequestMethod.POST)
    public void sendHomeworkFinishMsgForTeacher(@RequestParam("userId") String userId,
                                                @RequestParam("userName") String userName,
                                                @RequestParam("homeworkId") Integer homeworkId,
                                                @RequestParam("studentName") String studentName,
                                                @RequestParam("subjectName") String subjectName);

    @RequestMapping(value = "/paike/feign/message/send_homework_msg_for_student.do", method = RequestMethod.POST)
    public void sendHomeworkMsgForStudent(@RequestParam("userId") String userId,
                                          @RequestParam("userName") String userName,
                                          @RequestParam("homeworkName") String homeworkName,
                                          @RequestParam("expiredTime") Date expiredTime);
}
